<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-用户列表">
</@frame.head>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 用户解锁 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th >用户名</th>
            <th >锁定时间</th>
            <th >解锁时间</th>
            <th >密码错误次数</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
        <#list listUser as user> 
             <tr  class="text-c">
                <td>${user.loginName}</td>
				<td>${(user.createDate?string("yyyy-MM-dd"))!}</td>
                <td>${(user.loginTime?string("yyyy-MM-dd"))!}</td>
                <td>${user.pageOfNum}</td>
                <td>			
               	<a href="javaScript:void(0);" onclick="clean('${user.loginName}');">解锁账户</a>													
               </td>
        </tr>
      </#list>
     </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/brand/query_brand.js"></script>
<script type="text/javascript">
var path="${contextPath}";
function clean(loginName){
	layer.confirm("确定解锁此用户吗?",function(){
		  $.ajax({
				url : path+"/userClean/userClean_clean",
				cache : false,
				type : 'post',
				dataType : 'html',
				data : {
					"userName":loginName},
				error : function() {
					layer.alert("操作失败!");
				},
				success : function(message) {
	        		if(message == "200"){
	                    layer.msg('操作成功!',{icon:1,time:1000},function(){
	                        window.location.reload();
	                    });
	 				}else if(message == "500"){
	 					layer.alert("系统繁忙！");
	 				}else{
	 					layer.alert(message);
	 				}
				}
		  });
	});
}
</script>